<template>
  <div class="personal">
    <el-row class="tac">
        <el-col :span="12">
            <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :router="true">

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==39">
              <el-menu-item index="/PersonalIndexView">
                    <i class="el-icon-menu"></i>
                    <span slot99O99IUII8="title">{{ findmenu.title }}</span>
                </el-menu-item>
                  </span></span></span>

              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==40">
                <el-menu-item index="/PersonalCalendarView">
                    <i class="el-icon-document"></i>
                    <span slot99O99IUII8="title">{{ findmenu.title }}</span>
                </el-menu-item>
                 </span></span></span>

                 <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==41">
                <el-menu-item index="/CreateCompanyView">
                    <i class="el-icon-document"></i>
                    <span slot99O99IUII8="title">{{ findmenu.title }}</span>
                </el-menu-item>
                    </span></span></span>

                    <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==42">
                <el-menu-item index="/JoinCompanyView">
                    <i class="el-icon-document"></i>
                    <span slot99O99IUII8="title">{{ findmenu.title }}</span>
                </el-menu-item>
                       </span></span></span>


              <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==43">
                <el-submenu index="2">
                    <template #title>
                        <i class="el-icon-setting"></i>
                        <span>{{ findmenu.title }}</span>
                    </template>
                    <el-menu-item-group>

                        <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==44">
                        <el-menu-item index="/EditUserView">{{ findmenu.title }}</el-menu-item>
                          </span></span></span>

                        <span slot99O99IUII8="title"><span v-for="findmenu in findmenus"><span v-if="findmenu.id==45">
                        <el-menu-item index="/IndexView">{{ findmenu.title }}</el-menu-item>
                        </span></span></span>
                    </el-menu-item-group>
                </el-submenu>

              </span></span></span>
            </el-menu>
        </el-col>
    </el-row>
  </div>
</template>

<script>

import instance from "@/utlis/request";

export default {
    name: 'PersonalMenu',
    data() {
      return {
        openeds: ['1'],
        isCollapse: true,
        findmenus:{},
      };
    },
  created:function (){
    this.initDate();
  },
  methods:{
    initDate:function (){
      instance.get("/Manage/UserMenus").then(res=>{
        this.findmenus=res.data.data
        console.log(res)
      })
    }
  }

}
</script>
<style scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
    width: 199px;
    min-height: 600px;
    line-height: 50%;
}

.wm {
    height: 40px;
}
</style>